import { PageQuery } from '@/model/baseModel';

export interface DeviceQuery extends PageQuery {
  deviceName?: string;
  deviceNo?: string;
  status?: number;
}

export interface DeviceVO {
  id: number;
  deviceName: string;
  deviceNo: string;
  sn: string;
  model: string;
  status: number;
  statusName: string;
  machineTypeId: number;
  managerId: number;
  managerName: string;
  channelCount: number;
  productCategoryId: number;
  productCategoryName: string;
  createTime: string;
  updateTime: string;
  createBy: string;
  updateBy: string;
  createDept: string;
  imgUrl?: string;
  hasLocation?: boolean;
}

export interface DeviceForm {
  id?: number;
  deviceName: string;
  deviceNo: string;
  sn: string;
  model: string;
  status: number;
  machineTypeId: number;
  managerId: number;
  imgUrl?: string;
  channelCount: number;
}

export interface DeviceResponse {
  code: number;
  msg: string;
  rows: DeviceVO[];
  total: number;
}

// 设备状态查询参数
export interface DeviceStatusQuery {
  deviceId?: number;
  deviceNo?: string;
  temperature?: number;
  humidity?: number;
  signalStrength?: number;
  lastOnlineTime?: string;
  lastMaintenanceTime?: string;
  maintenanceCycle?: number;
}

// 设备状态表单对象
export interface DeviceStatusForm {
  id?: number;
  deviceId: number;
  deviceNo: string;
  temperature: number;
  humidity: number;
  signalStrength: number;
  lastOnlineTime: string;
  lastMaintenanceTime: string;
  maintenanceCycle: number;
}

// 设备状态响应对象
export interface DeviceStatusVO {
  id: number;
  deviceId: number;
  deviceNo: string;
  temperature: number;
  humidity: number;
  signalStrength: number;
  lastOnlineTime: string;
  lastMaintenanceTime: string;
  maintenanceCycle: number;
  createTime: string;
  updateTime: string;
}
